package com.zhongke.cotrun.model.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 系统消息
 *
 * @author lee
 * @email wawzj512541@gmail.com
 * @date 2020-03-30 09:58:29
 */
@Data
@TableName("sys_message")
@ApiModel(value = "SysMessageEntity", description = "系统消息Model")
public class SysMessageEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键id,自动递增
     */
    @TableId(type = IdType.AUTO)
    private Long messageId;
    /**
     * 消息类型 1:通知,2评论,3消息,4关注
     */
    @ApiModelProperty(value = "消息类型 1:通知,2:评论,3:消息,4:关注")
    private Integer messageType;
    /**
     * 消息发送方id
     */
    @ApiModelProperty(value = "消息发送方id")
    private Long fromUserId;
    /**
     * 消息接收方id
     */
    @ApiModelProperty(value = "消息接收方id")
    private Long toUserId;
    /**
     * 关联项目类型
     */
    @ApiModelProperty(value = "关联项目类型 专家:expert,机构:company,经纪人:agent,项目技术:project,活动:activities,需求:demand")
    private String linkItemType;
    /**
     * 关联项目id
     */
    @ApiModelProperty(value = "关联项目id")
    private Long linkItemId;
    /**
     * 消息标题
     */
    @ApiModelProperty(value = "消息标题")
    private String title;
    /**
     * 消息内容
     */
    @ApiModelProperty(value = "消息内容")
    private String context;
    /**
     * 删除标记 0:正常,1:删除
     */
    @TableLogic
    @ApiModelProperty(value = "删除标记 0:正常,1:删除")
    private Integer delFlag;
    /**
     * 已读标记 0:未读,1:已读
     */
    @ApiModelProperty(value = "已读标记 0:未读,1:已读")
    private Integer readFlag;
    /**
     * 阅读时间
     */
    @ApiModelProperty(value = "阅读时间")
    @JsonFormat(pattern = "yyyy/MM/dd HH:mm:ss", timezone = "GMT+8")
    private Date readTime;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy/MM/dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

}
